<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link href="./css/index.css" rel="stylesheet" />
		<title>小谢的登录作业</title>
		 
		 
	</head>
	<body>
		 
		
		<div id="app" class="login">
			

			
			<div class="login-content">
				
				<div>
					<ul class="login-tabs">
						<li :class="{'login-tabs-cur': type === 0}" @click="type = 0">登录</li>
						<li :class="{'login-tabs-cur': type === 1}" @click="type = 1">注册</li>
					</ul>
					
					<input placeholder="昵称" v-show="type === 1" v-model="form.name" />
					<input placeholder="账户" v-model="form.acc" />
					<input placeholder="密码" type="password" v-model="form.pwd" />
					<input placeholder="再次输入密码" v-show="type === 1" type="password" v-model="form.pwd2" />
					
					<button @click="type ? reg() : login()">{{type ? '注 册' : '登 录'}}</button>
					<footer>登录或注册即表示同意<a href="#">服务协议</a></footer>
				</div>
				
				
			</div>
			
			
			 
				

			
		</div>
		<script src="./js/config.js"></script>
		<script src="./js/q.js"></script>
		<script>
			new Vue({
				mixins:[config],
				data:data2,
				methods: {
					login,reg,
		
				},
			})
			
			 
			
		</script>

	</body>
</html>